import 'package:flutter/material.dart';
import 'package:my_flutter_app/main.dart';

class ButtonRoute extends StatelessWidget {
  void _onPressed() {
    print(MY_TAG_1 + "PRESSED");
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("textButton"),
      ),
      body: Center(
        child: Column(
          children: <Widget>[
            Column(
              children: <Widget>[
                Text("button"),
                RaisedButton(
                  onPressed: () {},
                  child: Text("normal"),
                ),
                FlatButton(
                  onPressed: () {},
                  child: Text("normal"),
                ),
                OutlineButton(
                  onPressed: () {},
                  child: Text("normal"),
                ),
                IconButton(
                  icon: Icon(Icons.thumb_up),
                  onPressed: () {},
                )
              ],
            ),
            Column(
              children: <Widget>[
                Text("带图标button"),
                RaisedButton.icon(
                  onPressed: _onPressed,
                  icon: Icon(Icons.send),
                  label: Text("发送"),
                ),
                OutlineButton.icon(
                  onPressed: _onPressed,
                  icon: Icon(Icons.add),
                  label: Text("添加"),
                ),
                FlatButton.icon(
                  onPressed: _onPressed,
                  icon: Icon(Icons.info),
                  label: Text("详情"),
                ),
              ],
            ),
            Column(
              children: <Widget>[
                Text("自定义Button"),
                FlatButton(
                  child: Text("submit"),
                  onPressed: _onPressed,
                  color: Colors.blue,
                  highlightColor: Colors.blue[700],
                  colorBrightness: Brightness.light,
                  splashColor: Colors.grey,
                  shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
                ),
                RaisedButton(
                  child: Text("submit"),
                  onPressed: _onPressed,
                  color: Colors.blue,
                  highlightColor: Colors.blue[700],
                  colorBrightness: Brightness.light,
                  splashColor: Colors.grey,
                  shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}
